import { defineStore } from 'pinia';
import type { IRouterState } from './types';
/**
 * 配置文件
 */
export const useRouterStore = defineStore('routerStore', {
  state: (): IRouterState => {
    return {
      activeRouteItem: null,
      activeProjectId: null,
      activeProjectList: null,
      routeList: [
         {
          key: '1',
          parentKey: '0',
          label: '项目管理',
          icon: 'DatabaseOutlined',
          children: [
            { key: '1-1', parentKey: '1', label: '项目管理', path: '/projectManage' }
          ],
        },
        // {
        //   key: '2',
        //   parentKey: '0',
        //   label: '组态配置管理',
        //   icon: 'CodepenOutlined',
        //   children: [
        //     { key: '2-1', parentKey: '2', label: '组态配置', path: '/configManage' }
        //   ],
        // },
      ],
    };
  },
  getters: {},
  actions: {},
  persist: {
    storage: sessionStorage,
  },
});
